#include <stdio.h>

int main(void)
{
    int n;
    if (scanf("%d", &n) != 1) {
        return 0;
    }

    if (n < 5) {
        printf("人数不够");
        return 0;
    }

    int excellent = 0; // >=90
    int good = 0;      // 80<=score<90
    int medium = 0;    // 70<=score<80
    int pass = 0;      // 60<=score<70
    int fail = 0;      // <60

    for (int i = 0; i < n; ++i) {
        int s;
        if (scanf("%d", &s) != 1) {
            return 0;
        }
        if (s >= 90) {
            excellent++;
        } else if (s >= 80) {
            good++;
        } else if (s >= 70) {
            medium++;
        } else if (s >= 60) {
            pass++;
        } else {
            fail++;
        }
    }

    printf("%d %d %d %d %d", excellent, good, medium, pass, fail);
    return 0;
}